package Strategy;

import Observer.EnvironmentData;

// 路径规划上下文
public class PathPlanner {
    private PathPlanningStrategy strategy;

    public PathPlanner(PathPlanningStrategy strategy) {
        this.strategy = strategy;
    }

    public void setStrategy(PathPlanningStrategy strategy) {
        this.strategy = strategy;
    }

    public Path planPath(FieldMap map, EnvironmentData data) {
        return strategy.calculatePath(map, data);
    }
}
